const list=require('./list');
const user=require('./user');
module.exports=function(app){
    app.use(function(req,res,next){
        //console.log(req.originalUrl,req.method,req.body,req.query)
        //res.header("Access-Control-Allow-Origin", "*");
        res.header("Access-Control-Allow-Credentials","true");
        res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS');
        //res.header("Content-Type", "application/json;charset=utf-8");
        next();
    })
    app.use('/api/list',list);
    app.use('/api/user',user);
}